package ren.kane.phoenix.quartz;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.impl.JobDetailImpl;

import java.util.Date;

/**
 * @author renrk(1275) on 2018-10-23 9:05 PM
 **/
public class TestJob implements Job {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        JobDetailImpl jobDetail = (JobDetailImpl) jobExecutionContext.getJobDetail();
        String jobName = jobDetail.getName();
        System.out.println(new Date() + " " + jobName);
    }
}
